package cate.game.fight;

import cate.common.table.d.GDPosition;
import cate.game.play.param.FightParam;
import cate.game.play.proce.play.PlayPO;
import cate.game.play.proce.play.PlayStory;
import cate.game.role.Role;
import easy.java.dev.note.NoteField;

public abstract class FightTaskContext {

    @NoteField("功能id")
    public int funcId;

    @NoteField("选择的编队")
    public byte posNum = GDPosition.DEFAULT_POS_NUM;

    @NoteField("剧本故事")
    public PlayStory playStory = new PlayStory();

    @NoteField("额外战斗参数")
    public FightParam param = new FightParam();

    @NoteField("跳过战斗")
    public boolean skip;

    @NoteField("播放速率")
    public Double playSpeed;

    @NoteField("是否下发录像 ")
    public boolean needSend  = true;

    /** 获取阵型应用类型 默认实现是使用功能ID */
    public int getPositionApply() {
        if (positionApply > 0) {
            return positionApply;
        }
        return this.funcId;
    }

    @NoteField("指定使用哪个功能的阵容")
    private int positionApply = -1;

    public void setPositionApply(int value) {
        this.positionApply = value;
    }

    /** 处理战斗结果 */
    public void handleResult(Role role, PlayPO play){

    }
}
